package proxy;

public class PerformanceMonitor {

    private static ThreadLocal<MethodPerformance> pormanceThreadLocal = new ThreadLocal<MethodPerformance>();

    public static void begin(String method) {
        System.out.println("begin monitor...");
        MethodPerformance mp = new MethodPerformance(method);
        pormanceThreadLocal.set(mp);
    }



    public static void end() {
        System.out.println("end monitor,,,");
        MethodPerformance methodPerformance = pormanceThreadLocal.get();
        methodPerformance.printPerformance();
    }
}
